#!/bin/sh
#
#You should have fetched the datasets in GIM/src/staticdata/J2B2
#assuming LnMlib/src/mrpt folder
#
# 1) sync staticdata folder
# 2) copy folder 21_02_11 to LnMlib/src/mrpt


#POSITION FILES
#21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_17:53:16.txt 
#21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_18:57:37.txt
#21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_18:25:38.txt

#RANGING FILES
#21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_17:53:16.txt
#21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:57:37.txt
#21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:25:38.txt


#Convert to Rawlog
./MaCI2Rawlog 21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_17:53:16.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_17:53:16.txt
#RUN ICP SLAM
icp-slam conf/icp-slam_demo.ini
#Save the result into MaCI logfile
./OpenLogAddEstimateAndSave 0 21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_17:53:16.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_17:53:16.txt LOG_ICP-SLAM/log_estimated_path.txt
#And visualize output
../apps/plotters/avant600_plotter MaCI_dataset.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_17:53:16.txt
cp out_result.jpg wism_I_result.jpg
cp MaCI_dataset.txt 21_02_11/J2B2.MaCI_Position.Matched_21_02_2011_17:53:16.txt

#REPEAT WITH SET 2
./MaCI2Rawlog 21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_18:57:37.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:57:37.txt
icp-slam conf/icp-slam_demo.ini
./OpenLogAddEstimateAndSave 0 21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_18:57:37.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:57:37.txt LOG_ICP-SLAM/log_estimated_path.txt
../apps/plotters/avant600_plotter MaCI_dataset.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:57:37.txt
cp out_result.jpg wism_III_result.jpg
cp MaCI_dataset.txt 21_02_11/J2B2.MaCI_Position.Matched_21_02_2011_18:57:37.txt


#REPEAT WITH SET 3
./MaCI2Rawlog 21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_18:25:38.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:25:38.txt
icp-slam conf/icp-slam_demo.ini
./OpenLogAddEstimateAndSave 0 21_02_11/J2B2.MaCI_Position.Motion_21_02_2011_18:25:38.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:25:38.txt LOG_ICP-SLAM/log_estimated_path.txt
../apps/plotters/avant600_plotter MaCI_dataset.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:25:38.txt
cp out_result.jpg wism_II_result.jpg
cp MaCI_dataset.txt 21_02_11/J2B2.MaCI_Position.Matched_21_02_2011_18:25:38.txt

../apps/plotters/avant600_plotter 21_02_11/J2B2.MaCI_Position.Matched_21_02_2011_17:53:16.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_17:53:16.txt
cp out_result.jpg 21_02_11/wism_I_result.jpg
../apps/plotters/avant600_plotter 21_02_11/J2B2.MaCI_Position.Matched_21_02_2011_18:25:38.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:25:38.txt
cp out_result.jpg 21_02_11/wism_II_result.jpg
../apps/plotters/avant600_plotter 21_02_11/J2B2.MaCI_Position.Matched_21_02_2011_18:57:37.txt 21_02_11/J2B2.MaCI_Ranging.Laser_21_02_2011_18:57:37.txt
cp out_result.jpg 21_02_11/wism_III_result.jpg
